package com.ruoyi.collection.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.collection.mapper.CollectionMapper;
import com.ruoyi.collection.domain.Collection;
import com.ruoyi.collection.service.ICollectionService;

/**
 * Collection业务层处理
 *
 * @author MingYu
 * @date 2021-12-20
 */
@Service
public class CollectionServiceImpl implements ICollectionService
{
    @Autowired
    private CollectionMapper collectionMapper;

    /**
     * 查询Collection
     *
     * @param GoodsId collection主键
     * @return collection
     */
    @Override
    public Collection selectCollectionByGoodsId(Int GoodsId)
    {
        return CollectionMapper.selectCollectionByGoodsId(GoodsId);
    }

    /**
     * 查询collection列表
     *
     * @param Collection collection
     * @return Collection
     */
    @Override
    public List<Collection> selectCollectionList(Collection collection)
    {
        return CollectionMapper.selectCollectionList(Collection);
    }

    /**
     * 新增collection
     *
     * @param Collection collection
     * @return 结果
     */
    @Override
    public int insertMine(Collection collection)
    {
        return CollectionMapper.insertMine(Collection);
    }

    /**
     * 批量删除collection
     *
     * @param GoodsId 需要删除的collection主键
     * @return 结果
     */
    @Override
    public int deleteCollectionByGoodsIds(Int[] GoodsIds)
    {
        return CollectionMapper.deleteCollectionByGoodsId(GoodsIds);
    }

    /**
     * 删除collection信息
     *
     * @param GoodsId collection主键
     * @return 结果
     */
    @Override
    public int deleteCollectionByGoodsId(Int GoodsId)
    {
        return CollectionMapper.deleteCollectionByGoodsId(GoodsId);
    }
}

